<div>

    <div class="ibox ">
        <div class="ibox-title">
            <h5>
                <vc:i18n name="查询条件"></vc:i18n>
            </h5>
            <div class="ibox-tools" style="top:10px;">

            </div>
        </div>
        <div class="ibox-content">
            <div class="row">
                <div class="col-sm-2">
                    <div class="form-group">
                        <input type="text" :placeholder="vc.i18n('请输入名称','liftMachineManage')"
                            v-model="liftMachineManageInfo.conditions.machineName" class=" form-control">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <input type="text" :placeholder="vc.i18n('请输入设备编号','liftMachineManage')"
                            v-model="liftMachineManageInfo.conditions.machineCode" class=" form-control">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <select class="custom-select" v-model="liftMachineManageInfo.conditions.factoryId">
                            <option selected disabled value="">{{vc.i18n('选择设备厂家','liftMachineManage')}}
                            </option>
                            <option v-for="(item, index) in liftMachineFactoryList" :key="index"
                                :value="item.factoryId">
                                {{item.factoryName}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <select class="custom-select" v-model="liftMachineManageInfo.conditions.state">
                            <option selected disabled value="">{{vc.i18n('选择电梯状态','liftMachineManage')}}
                            </option>
                            <option v-for="(item, index) in liftStates" :key="index" :value="item.statusCd">
                                {{item.name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <input type="text" :placeholder="vc.i18n('请输入设备ID','liftMachineManage')"
                            v-model="liftMachineManageInfo.conditions.machineId" class=" form-control">
                    </div>
                </div>
                <div class="col-sm-2">
                    <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryLiftMachineMethod()">
                        <vc:i18n name="查询" namespace="liftMachineManage"></vc:i18n>
                    </button>
                    <button type="button" class="btn btn-primary btn-sm" v-on:click="_resetLiftMachineMethod()">
                        <vc:i18n name="重置" namespace="liftMachineManage"></vc:i18n>
                    </button>
                </div>
            </div>
            <div class="row">

                <div class="col-sm-2">
                    <div class="form-group">
                        <input type="text" :placeholder="vc.i18n('请输入位置','liftMachineManage')"
                            v-model="liftMachineManageInfo.conditions.locationName" class=" form-control">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <input type="text" :placeholder="vc.i18n('请输入品牌','liftMachineManage')"
                            v-model="liftMachineManageInfo.conditions.brand" class=" form-control">
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="form-group">
                        <input type="number" :placeholder="vc.i18n('请输入当前楼层','liftMachineManage')"
                            v-model="liftMachineManageInfo.conditions.curLayer" class=" form-control">
                    </div>
                </div>
            </div>

        </div>
    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>
                <vc:i18n name="电梯信息" namespace="liftMachineManage"></vc:i18n>
            </h5>
            <div class="ibox-tools" style="top:10px;">
                <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddLiftMachineModal()">
                    <vc:i18n name="添加" namespace="liftMachineManage"></vc:i18n>
                </button>
            </div>
        </div>
        <div class="ibox-content">

            <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                <thead>
                    <tr>
                        <th class="text-center">
                            <vc:i18n name='设备ID' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='名称' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='设备编号' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='品牌' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='位置' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='登记单位' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='使用单位' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='维保单位' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='救援电话' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='厂家' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='电梯状态' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='当前楼层' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='在线状态' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='心跳时间' namespace='liftMachineManage'></vc:i18n>
                        </th>
                        <th class="text-center">
                            <vc:i18n name='操作'></vc:i18n>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="liftMachine in liftMachineManageInfo.liftMachines">
                        <td class="text-center">{{liftMachine.machineId}}</td>
                        <td class="text-center">{{liftMachine.machineName}}</td>
                        <td class="text-center">{{liftMachine.machineCode}}</td>
                        <td class="text-center">{{liftMachine.brand}}</td>
                        <td class="text-center">{{liftMachine.locationName}}</td>
                        <td class="text-center">{{liftMachine.registrationUnit}}</td>
                        <td class="text-center">{{liftMachine.useUnit}}</td>
                        <td class="text-center">{{liftMachine.maintenanceUnit}}</td>
                        <td class="text-center">{{liftMachine.rescueLink}}</td>
                        <td class="text-center">{{liftMachine.factoryName}}</td>
                        <td class="text-center">
                            {{liftMachine.stateName}}
                            <span v-if="liftMachine.state == '1001'">
                                (<a href="javascript:void(0)" @click="_switchLiftState(liftMachine)">停止</a>)
                            </span>
                            <span v-if="liftMachine.state == '2002'">
                                (<a href="javascript:void(0)" @click="_switchLiftState(liftMachine)">启用</a>)
                            </span>
                        </td>
                        <td class="text-center">{{liftMachine.curLayer}}(层)</td>
                        <td class="text-center">{{liftMachine.isOnlineStateName}}</td>
                        <td class="text-center">{{liftMachine.heartbeatTime}}</td>
                        <td class="text-center">
                            <div class="btn-group">
                                <button class="btn-white btn btn-xs" v-on:click="_toLiftDetail(liftMachine)">
                                    <vc:i18n name='详情'></vc:i18n>
                                </button>
                            </div>
                            <div class="btn-group">
                                <button class="btn-white btn btn-xs"
                                    v-on:click="_openReservationLiftMachineModel(liftMachine)">
                                    <vc:i18n name='预约'></vc:i18n>
                                </button>
                            </div>
                            <div class="btn-group">
                                <button class="btn-white btn btn-xs"
                                    v-on:click="_openEditLiftMachineModel(liftMachine)">
                                    <vc:i18n name='修改'></vc:i18n>
                                </button>
                            </div>
                            <div class="btn-group">
                                <button class="btn-white btn btn-xs"
                                    v-on:click="_openDeleteLiftMachineModel(liftMachine)">
                                    <vc:i18n name='删除'></vc:i18n>
                                </button>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
            <!-- 分页 -->
            <vc:create path="frame/pagination"></vc:create>
        </div>

    </div>


    <vc:create path="lift/addLiftMachine" callBackListener="" callBackFunction=""></vc:create>
    <vc:create path="lift/editLiftMachine"></vc:create>
    <vc:create path="lift/deleteLiftMachine"></vc:create>
    <vc:create path="lift/reservationLiftMachine"></vc:create>
</div>